/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package multi.agent.simulation.nodesetup;

/**
 *
 * @author MMM80634
 */
import java.awt.Component;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.swing.DefaultListModel;
import javax.swing.JOptionPane;
import multi.agent.simulation.dao.NodoJpaController;
import multi.agent.simulation.dao.RutasJpaController;
import multi.agent.simulation.dao.exceptions.IllegalOrphanException;
import multi.agent.simulation.dao.exceptions.NonexistentEntityException;
import multi.agent.simulation.dao.exceptions.PreexistingEntityException;
import multi.agent.simulation.entity.Nodo;
import multi.agent.simulation.entity.Rutas;
import multi.agent.simulation.entity.RutasPK;


public class NodeSetupApplication extends javax.swing.JFrame {

    /**
     * Creates new form NodeSetupApplication
     */
  
  DefaultListModel todos = new DefaultListModel();
  DefaultListModel todosDispon = new DefaultListModel();
  DefaultListModel vecinos;
  Rutas selectedEditRuta;
    private Component frame;
 
    public NodeSetupApplication() {
        initComponents();
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("multi-agent-simulationPU");
        RutasJpaController con = new RutasJpaController(emf);
        NodoJpaController nodoC = new NodoJpaController(emf);
        List<Nodo> nodos = nodoC.findNodoEntities();
        //Nodo n = nodoC.findNodo(1);
        
        //ArrayList<Rutas> list = con.findRutasEntities(n);
        //Iterator it = list.iterator();              
        
      
        
        for(int i = 0; i<=nodos.size()-1; i++){
            todos.addElement(nodos.get(i).getNombre());       
            todosDispon.addElement(nodos.get(i).getNombre());   
         }
        
        jLstNodes.setModel(todos);
        jListAllNodes.setModel(todosDispon);
      
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMessage = new javax.swing.JDialog();
        jLblMessage = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        jDialog1 = new javax.swing.JDialog();
        jMainTabPanel = new javax.swing.JTabbedPane();
        jNewNode = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jTxtName = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jScrollPane2 = new javax.swing.JScrollPane();
        jLstNodes = new javax.swing.JList();
        jLabel4 = new javax.swing.JLabel();
        jBtnAdd = new javax.swing.JButton();
        JBtnOK = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jTxtMax = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jTxtVelMaxmia = new javax.swing.JTextField();
        jTxtNodDest = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jTxtDistance = new javax.swing.JTextField();
        jBtnCreate = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jEditNode = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jListAllNodes = new javax.swing.JList();
        jBtnDelete = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JSeparator();
        jLabel7 = new javax.swing.JLabel();
        jTxtNameUpd = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jListNeigh = new javax.swing.JList();
        jBtnOkUpd = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jTxtCapUpd = new javax.swing.JTextField();
        jTxtVelUpd = new javax.swing.JTextField();
        jTxtDistUpd = new javax.swing.JTextField();
        jBtnBorrar = new javax.swing.JButton();
        menuBar = new javax.swing.JMenuBar();
        fileMenu = new javax.swing.JMenu();
        openMenuItem = new javax.swing.JMenuItem();
        exitMenuItem = new javax.swing.JMenuItem();
        helpMenu = new javax.swing.JMenu();
        contentsMenuItem = new javax.swing.JMenuItem();
        aboutMenuItem = new javax.swing.JMenuItem();

        jMessage.setTitle("Mensaje");
        jMessage.setModal(true);
        jMessage.setUndecorated(true);

        jLblMessage.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        jButton2.setText("Close");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jMessageLayout = new javax.swing.GroupLayout(jMessage.getContentPane());
        jMessage.getContentPane().setLayout(jMessageLayout);
        jMessageLayout.setHorizontalGroup(
            jMessageLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jMessageLayout.createSequentialGroup()
                .addGap(35, 35, 35)
                .addComponent(jButton2)
                .addContainerGap(362, Short.MAX_VALUE))
            .addGroup(jMessageLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLblMessage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jMessageLayout.setVerticalGroup(
            jMessageLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jMessageLayout.createSequentialGroup()
                .addComponent(jLblMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton2)
                .addContainerGap(236, Short.MAX_VALUE))
        );

        jList1.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane1.setViewportView(jList1);

        javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
        jDialog1.getContentPane().setLayout(jDialog1Layout);
        jDialog1Layout.setHorizontalGroup(
            jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jDialog1Layout.setVerticalGroup(
            jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        jMainTabPanel.setName(""); // NOI18N

        jLabel2.setText("Nombre del Nodo:");

        jTxtName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTxtNameActionPerformed(evt);
            }
        });

        jLabel3.setText("Configuracion de Vecinos");

        jLstNodes.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                jLstNodesValueChanged(evt);
            }
        });
        jScrollPane2.setViewportView(jLstNodes);

        jLabel4.setText("Lista de Nodos:");

        jBtnAdd.setText(">");
        jBtnAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBtnAddActionPerformed(evt);
            }
        });

        JBtnOK.setText("OK");
        JBtnOK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBtnOKActionPerformed(evt);
            }
        });

        jLabel9.setText("Nodo Destino:");

        jLabel10.setText("Capacidad Máxima:");

        jLabel11.setText("Velocidad Máxima:");

        jTxtNodDest.setEditable(false);
        jTxtNodDest.setOpaque(false);

        jLabel5.setText("Distancia:");

        jTxtDistance.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTxtDistanceActionPerformed(evt);
            }
        });

        jBtnCreate.setText("Crear");
        jBtnCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBtnCreateActionPerformed(evt);
            }
        });

        jButton1.setText("All");
        jButton1.setToolTipText("Presiona Aquí para cargar todos los nodos nuevamente");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jNewNodeLayout = new javax.swing.GroupLayout(jNewNode);
        jNewNode.setLayout(jNewNodeLayout);
        jNewNodeLayout.setHorizontalGroup(
            jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jNewNodeLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jNewNodeLayout.createSequentialGroup()
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                            .addComponent(jBtnAdd, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jNewNodeLayout.createSequentialGroup()
                                .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jNewNodeLayout.createSequentialGroup()
                                        .addGap(12, 12, 12)
                                        .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTxtNodDest, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel10)
                                            .addComponent(jTxtMax, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jNewNodeLayout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTxtVelMaxmia, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jTxtDistance, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel5)))
                                    .addGroup(jNewNodeLayout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jLabel11)))
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jNewNodeLayout.createSequentialGroup()
                                .addGap(168, 168, 168)
                                .addComponent(JBtnOK))))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jNewNodeLayout.createSequentialGroup()
                        .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jNewNodeLayout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTxtName)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBtnCreate)))
                .addContainerGap())
        );
        jNewNodeLayout.setVerticalGroup(
            jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jNewNodeLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jTxtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBtnCreate))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jLabel9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jNewNodeLayout.createSequentialGroup()
                        .addComponent(jScrollPane2)
                        .addContainerGap())
                    .addGroup(jNewNodeLayout.createSequentialGroup()
                        .addComponent(jTxtNodDest, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel10)
                        .addGap(2, 2, 2)
                        .addComponent(jTxtMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jBtnAdd)
                            .addGroup(jNewNodeLayout.createSequentialGroup()
                                .addComponent(jLabel11)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTxtVelMaxmia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jNewNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jNewNodeLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel5)
                                .addGap(10, 10, 10)
                                .addComponent(jTxtDistance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JBtnOK))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jNewNodeLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButton1)
                                .addContainerGap())))))
        );

        jLabel9.getAccessibleContext().setAccessibleName("Propiedad Ruta");

        jMainTabPanel.addTab("New", jNewNode);

        jLabel6.setText("Lista de Nodos:");

        jListAllNodes.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { " " };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jListAllNodes.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                jListAllNodesValueChanged(evt);
            }
        });
        jScrollPane4.setViewportView(jListAllNodes);

        jBtnDelete.setText("Borrar Nodo");
        jBtnDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBtnDeleteActionPerformed(evt);
            }
        });

        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jLabel7.setText("Nodo Seleccionado:");

        jTxtNameUpd.setEditable(false);

        jLabel8.setText("Lista de Vecinos");

        jListNeigh.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                jListNeighValueChanged(evt);
            }
        });
        jScrollPane5.setViewportView(jListNeigh);

        jBtnOkUpd.setText("Actualizar Ruta");
        jBtnOkUpd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBtnOkUpdActionPerformed(evt);
            }
        });

        jLabel1.setText("Capacidad Maxima:");

        jLabel12.setText("Velocidad Maxima:");

        jLabel13.setText("Distancia:");

        jTxtCapUpd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTxtCapUpdActionPerformed(evt);
            }
        });

        jBtnBorrar.setText("Borrar Ruta");
        jBtnBorrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBtnBorrarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jEditNodeLayout = new javax.swing.GroupLayout(jEditNode);
        jEditNode.setLayout(jEditNodeLayout);
        jEditNodeLayout.setHorizontalGroup(
            jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jEditNodeLayout.createSequentialGroup()
                .addGroup(jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jEditNodeLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jEditNodeLayout.createSequentialGroup()
                                .addComponent(jLabel6)
                                .addGap(99, 99, 99)
                                .addComponent(jLabel7)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(jEditNodeLayout.createSequentialGroup()
                                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTxtNameUpd)
                                    .addComponent(jLabel8)
                                    .addGroup(jEditNodeLayout.createSequentialGroup()
                                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTxtCapUpd)
                                            .addComponent(jTxtVelUpd, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                                            .addGroup(jEditNodeLayout.createSequentialGroup()
                                                .addGroup(jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jLabel1)
                                                    .addComponent(jLabel12)
                                                    .addComponent(jLabel13))
                                                .addGap(0, 0, Short.MAX_VALUE))
                                            .addComponent(jTxtDistUpd, javax.swing.GroupLayout.Alignment.TRAILING)))))))
                    .addGroup(jEditNodeLayout.createSequentialGroup()
                        .addGap(40, 40, 40)
                        .addComponent(jBtnDelete)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jBtnBorrar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBtnOkUpd)))
                .addContainerGap())
        );
        jEditNodeLayout.setVerticalGroup(
            jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jEditNodeLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jSeparator2)
                    .addComponent(jScrollPane4)
                    .addGroup(jEditNodeLayout.createSequentialGroup()
                        .addComponent(jTxtNameUpd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)
                            .addGroup(jEditNodeLayout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTxtCapUpd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(10, 10, 10)
                                .addComponent(jLabel12)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTxtVelUpd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel13)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jTxtDistUpd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jEditNodeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBtnDelete)
                    .addComponent(jBtnOkUpd)
                    .addComponent(jBtnBorrar))
                .addContainerGap(13, Short.MAX_VALUE))
        );

        jMainTabPanel.addTab("Edit", jEditNode);

        fileMenu.setMnemonic('f');
        fileMenu.setText("File");

        openMenuItem.setMnemonic('o');
        openMenuItem.setText("Open");
        fileMenu.add(openMenuItem);

        exitMenuItem.setMnemonic('x');
        exitMenuItem.setText("Exit");
        exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitMenuItemActionPerformed(evt);
            }
        });
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        helpMenu.setMnemonic('h');
        helpMenu.setText("Help");

        contentsMenuItem.setMnemonic('c');
        contentsMenuItem.setText("Contents");
        helpMenu.add(contentsMenuItem);

        aboutMenuItem.setMnemonic('a');
        aboutMenuItem.setText("About");
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        setJMenuBar(menuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jMainTabPanel)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jMainTabPanel)
                .addContainerGap())
        );

        jMainTabPanel.getAccessibleContext().setAccessibleName("NewNode");

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitMenuItemActionPerformed
        System.exit(0);
    }//GEN-LAST:event_exitMenuItemActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        jMessage.dispose();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jBtnOkUpdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnOkUpdActionPerformed
        // TODO add your handling code here:
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("multi-agent-simulationPU");
        RutasJpaController con = new RutasJpaController(emf);
         NodoJpaController nodoC = new NodoJpaController(emf);
        selectedEditRuta.setCapacidadMaxima(Integer.parseInt(jTxtCapUpd.getText()));
        selectedEditRuta.setDistancia(Integer.parseInt(jTxtDistUpd.getText()));
        selectedEditRuta.setVelocidadMaxima(Integer.parseInt(jTxtVelUpd.getText()));
        Rutas selectedInvertedRuta = new Rutas();
        selectedInvertedRuta.setDesde(selectedEditRuta.getHasta());
        //selectedInvertedRuta.setDesde(nodoC.findNodo(jTxtNameUpd.getText()));                
        selectedInvertedRuta.setHasta(selectedEditRuta.getDesde());
        //selectedInvertedRuta.setHasta(nodoC.findNodo(jTxtNodDest.getText()));
        selectedInvertedRuta.setRutasPK(selectedEditRuta.getRutasPK());
        selectedInvertedRuta.setCapacidadMaxima(Integer.parseInt(jTxtCapUpd.getText()));
        selectedInvertedRuta.setDistancia(Integer.parseInt(jTxtDistUpd.getText()));
        selectedInvertedRuta.setVelocidadMaxima(Integer.parseInt(jTxtVelUpd.getText()));
        try {
            con.edit(selectedEditRuta);
            con.edit(selectedInvertedRuta);
            JOptionPane.showMessageDialog(frame, "Ruta Actualizada",
                    "Correcto",
                    JOptionPane.INFORMATION_MESSAGE);
            jTxtNodDest.setText(null);
            jTxtMax.setText(null);
            jTxtDistance.setText(null);
            jTxtVelMaxmia.setText(null);
        } catch (NonexistentEntityException ex) {
            Logger.getLogger(NodeSetupApplication.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(NodeSetupApplication.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }//GEN-LAST:event_jBtnOkUpdActionPerformed

    private void jTxtNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTxtNameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTxtNameActionPerformed

    private void jBtnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnAddActionPerformed
        // TODO add your handling code here:        
      if (jTxtName.getText().equalsIgnoreCase(jLstNodes.getSelectedValue().toString()))
        {
            return;
        }       
        jTxtNodDest.setText(jLstNodes.getSelectedValue().toString());
        todos.remove(jLstNodes.getSelectedIndex());
    }//GEN-LAST:event_jBtnAddActionPerformed

    private void JBtnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JBtnOKActionPerformed
        // TODO add your handling code here:
        
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("multi-agent-simulationPU");
        RutasJpaController con = new RutasJpaController(emf);
        NodoJpaController nodoC = new NodoJpaController(emf);   
        Rutas newRuta = new Rutas();        
   
        try {
            newRuta.setDesde(nodoC.findNodo(jTxtName.getText()));
            newRuta.setHasta(nodoC.findNodo(jTxtNodDest.getText()));
            newRuta.setCapacidadMaxima(Integer.parseInt(jTxtMax.getText()));
            newRuta.setDistancia(Integer.parseInt(jTxtDistance.getText()));
            newRuta.setVelocidadMaxima(Integer.parseInt(jTxtVelMaxmia.getText()));
            con.create(newRuta);
            newRuta.setDesde(nodoC.findNodo(jTxtNodDest.getText()));
            newRuta.setHasta(nodoC.findNodo(jTxtName.getText()));
            con.create(newRuta);
            JOptionPane.showMessageDialog(frame, "Ruta Creada Satisfactoriamente",
                    "Correcto",
                    JOptionPane.INFORMATION_MESSAGE);
            jTxtNodDest.setText(null);
            jTxtMax.setText(null);
            jTxtDistance.setText(null);
            jTxtVelMaxmia.setText(null);
        } catch (PreexistingEntityException ex) {
            JOptionPane.showMessageDialog(frame, "La Ruta ya Existe", 
            "Waring",
            JOptionPane.WARNING_MESSAGE);
            Logger.getLogger(NodeSetupApplication.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(frame, "Error en la operacion", 
            "Error",
            JOptionPane.ERROR_MESSAGE);
            Logger.getLogger(NodeSetupApplication.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }//GEN-LAST:event_JBtnOKActionPerformed

    private void jTxtDistanceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTxtDistanceActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTxtDistanceActionPerformed

    private void jBtnCreateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnCreateActionPerformed
        // TODO add your handling code here:
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("multi-agent-simulationPU");
        RutasJpaController con = new RutasJpaController(emf);
        NodoJpaController nodoC = new NodoJpaController(emf);
        Nodo newNodo = new Nodo(); 
        newNodo.setNombre(jTxtName.getText());
        if (nodoC.findNodo(jTxtName.getText()) == null) {
            nodoC.create(newNodo);
            todos.addElement(newNodo.getNombre());
            todosDispon.addElement(newNodo.getNombre());
            //jTxtName.setText(null);
        }   
        //addtoContainer(jTxtName.getText());
    }//GEN-LAST:event_jBtnCreateActionPerformed

    private void jListAllNodesValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jListAllNodesValueChanged
        // TODO add your handling code here:
        if (jListAllNodes.getSelectedValue() == null)
        {
            return;
        }
        jTxtNameUpd.setText(jListAllNodes.getSelectedValue().toString());
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("multi-agent-simulationPU");
        RutasJpaController con = new RutasJpaController(emf);
        NodoJpaController nodoC = new NodoJpaController(emf);
        Nodo nodo = nodoC.findNodo(jTxtNameUpd.getText());
        vecinos = new DefaultListModel();
        ArrayList<Rutas> list = con.findRutasEntities(nodo);
          for(int i = 0; i<=list.size()-1; i++){
            vecinos.addElement(list.get(i).getHasta().getNombre());            
         }
        jListNeigh.setModel(vecinos);
    }//GEN-LAST:event_jListAllNodesValueChanged

    private void jBtnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnDeleteActionPerformed
        // TODO add your handling code here:
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("multi-agent-simulationPU");
        RutasJpaController con = new RutasJpaController(emf);
        NodoJpaController nodoC = new NodoJpaController(emf);
        try {
            Nodo nodo = nodoC.findNodo(jTxtNameUpd.getText());
            ArrayList<Rutas> list = con.findRutasEntities(nodo);            
            for(int i = 0; i<=list.size()-1; i++){
                RutasPK Invertedruta = new RutasPK();
                Invertedruta.setDesde(list.get(i).getRutasPK().getHasta());
                Invertedruta.setHasta(list.get(i).getRutasPK().getDesde());                
                con.destroy(list.get(i).getRutasPK());
                con.destroy(Invertedruta);
                
         }
            
            nodoC.destroy(nodoC.findNodo(jListAllNodes.getSelectedValue().toString()).getId());
            JOptionPane.showMessageDialog(frame, "El Nodo ha sido Borrado",
                    "Correcto",
                    JOptionPane.INFORMATION_MESSAGE);
            List<Nodo> nodos = nodoC.findNodoEntities();  
            todos = new DefaultListModel(); 
            todosDispon = new DefaultListModel();
            for(int i = 0; i<=nodos.size()-1; i++){
                todos.addElement(nodos.get(i).getNombre());
                todosDispon.addElement(nodos.get(i).getNombre());  
            }
            jLstNodes.setModel(todos);   
            jListAllNodes.setModel(todosDispon);
            jTxtName.setText(null);
            jTxtNameUpd.setText(null);
        } catch (IllegalOrphanException ex) {
            JOptionPane.showMessageDialog(frame, "Ha Ocurrido un Error en el Borrado",
                    "Error",
                    JOptionPane.ERROR_MESSAGE);
            Logger.getLogger(NodeSetupApplication.class.getName()).log(Level.SEVERE, null, ex);
        } catch (NonexistentEntityException ex) {
            JOptionPane.showMessageDialog(frame, "Ha Ocurrido un Error en el Borrado",
                    "Error",
                    JOptionPane.ERROR_MESSAGE);
            Logger.getLogger(NodeSetupApplication.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jBtnDeleteActionPerformed

    private void jTxtCapUpdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTxtCapUpdActionPerformed
        // TODO add your handling code here:
      
        
    }//GEN-LAST:event_jTxtCapUpdActionPerformed

    private void jListNeighValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jListNeighValueChanged
        // TODO add your handling code here:
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("multi-agent-simulationPU");
        RutasJpaController con = new RutasJpaController(emf);
        NodoJpaController nodoC = new NodoJpaController(emf);
        Nodo nodo = nodoC.findNodo(jTxtNameUpd.getText());
        ArrayList<Rutas> list = con.findRutasEntities(nodo);
        for(int i = 0; i<=list.size()-1; i++){
            if (list.get(i).getHasta().getNombre().equalsIgnoreCase(jListNeigh.getSelectedValue().toString()))           
            {
                selectedEditRuta = list.get(i);
                jTxtCapUpd.setText(String.valueOf(list.get(i).getCapacidadMaxima()));
                jTxtDistUpd.setText(String.valueOf(list.get(i).getDistancia()));
                jTxtVelUpd.setText(String.valueOf(list.get(i).getVelocidadMaxima()));
            }
         }
    }//GEN-LAST:event_jListNeighValueChanged

    private void jLstNodesValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jLstNodesValueChanged
        // TODO add your handling code here:
        //jTxtName.setText(jLstNodes.getSelectedValue().toString());
    }//GEN-LAST:event_jLstNodesValueChanged

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("multi-agent-simulationPU");
        RutasJpaController con = new RutasJpaController(emf);
        NodoJpaController nodoC = new NodoJpaController(emf);
        List<Nodo> nodos = nodoC.findNodoEntities();
        todos = new DefaultListModel();
        //todosDispon = new DefaultListModel();
        for(int i = 0; i<=nodos.size()-1; i++){
            todos.addElement(nodos.get(i).getNombre());       
            //todosDispon.addElement(nodos.get(i).getNombre());   
         }
        jLstNodes.setModel(todos);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jBtnBorrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnBorrarActionPerformed
        // TODO add your handling code here:
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("multi-agent-simulationPU");
        RutasJpaController con = new RutasJpaController(emf);
        NodoJpaController nodoC = new NodoJpaController(emf);
        RutasPK delRuta = new RutasPK();
        RutasPK delInvertedRuta = new RutasPK();
        delRuta.setDesde(nodoC.findNodo(jTxtNameUpd.getText()).getId());
        delRuta.setHasta(nodoC.findNodo(jListNeigh.getSelectedValue().toString()).getId());
        delInvertedRuta.setHasta(nodoC.findNodo(jTxtNameUpd.getText()).getId());
        delInvertedRuta.setDesde(nodoC.findNodo(jListNeigh.getSelectedValue().toString()).getId());
        try {
            con.destroy(delRuta);
            con.destroy(delInvertedRuta);
            JOptionPane.showMessageDialog(frame, "El Nodo ha sido Borrado",
                    "Correcto",
                    JOptionPane.INFORMATION_MESSAGE);
            jTxtCapUpd.setText(null);
            jTxtDistUpd.setText(null);
            jTxtVelUpd.setText(null);
            vecinos.remove(jListNeigh.getSelectedIndex());
            jListNeigh.setModel(vecinos);
        } catch (NonexistentEntityException ex) {
             JOptionPane.showMessageDialog(frame, "Ha Ocurrido un Error en el Borrado",
                    "Error",
                    JOptionPane.ERROR_MESSAGE);
            Logger.getLogger(NodeSetupApplication.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jBtnBorrarActionPerformed

    private void addtoContainer(String name)
    {
      try 
            { 
            Runtime rt = Runtime.getRuntime(); 
 
            String command = "cmd"; 
            Process pr = rt.exec(command); 
 
            BufferedReader processOutput = new BufferedReader(new InputStreamReader(pr.getInputStream())); 
            BufferedWriter processInput = new BufferedWriter(new OutputStreamWriter(pr.getOutputStream())); 
  

            String commandToSend = "java -cp /JADE-bin-4.2.0/jade/lib/jade.jar jade.Boot -container -host cwm-vm-test2 -port 1099 -agents "+ name +":jade.core.Agent\n"; 
 
            processInput.write(commandToSend);             
            processInput.flush();          
           
            
            processInput.close(); 
            processOutput.close(); 
            } 
        catch(Exception x) 
           { 
            x.printStackTrace(); 
           }
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(NodeSetupApplication.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(NodeSetupApplication.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(NodeSetupApplication.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(NodeSetupApplication.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new NodeSetupApplication().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton JBtnOK;
    private javax.swing.JMenuItem aboutMenuItem;
    private javax.swing.JMenuItem contentsMenuItem;
    private javax.swing.JMenuItem exitMenuItem;
    private javax.swing.JMenu fileMenu;
    private javax.swing.JMenu helpMenu;
    private javax.swing.JButton jBtnAdd;
    private javax.swing.JButton jBtnBorrar;
    private javax.swing.JButton jBtnCreate;
    private javax.swing.JButton jBtnDelete;
    private javax.swing.JButton jBtnOkUpd;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JPanel jEditNode;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLblMessage;
    private javax.swing.JList jList1;
    private javax.swing.JList jListAllNodes;
    private javax.swing.JList jListNeigh;
    private javax.swing.JList jLstNodes;
    private javax.swing.JTabbedPane jMainTabPanel;
    private javax.swing.JDialog jMessage;
    private javax.swing.JPanel jNewNode;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JTextField jTxtCapUpd;
    private javax.swing.JTextField jTxtDistUpd;
    private javax.swing.JTextField jTxtDistance;
    private javax.swing.JTextField jTxtMax;
    private javax.swing.JTextField jTxtName;
    private javax.swing.JTextField jTxtNameUpd;
    private javax.swing.JTextField jTxtNodDest;
    private javax.swing.JTextField jTxtVelMaxmia;
    private javax.swing.JTextField jTxtVelUpd;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenuItem openMenuItem;
    // End of variables declaration//GEN-END:variables
}
